package sz.com.postoffice.jxyzwgcase.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.github.pagehelper.Page;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import sz.com.postoffice.jxyzwgcase.core.TableDataInfo;
import sz.com.postoffice.jxyzwgcase.dao.BaseDao;
import sz.com.postoffice.jxyzwgcase.dao.master.CustomerDao;
import sz.com.postoffice.jxyzwgcase.pojo.Customer;
import sz.com.postoffice.jxyzwgcase.service.CustomerService;

/**
 * @ClassName DailyIncomeServcieImpl
 * @Deacription 日收入逻辑处理层
 * @Author jmx
 * @Date 2020/11/12 16:16
 * @Version 1.0
 **/
@Service
public class CustomerServcieImpl extends BaseServiceImpl<Customer> implements CustomerService {
    private static Logger logger = LoggerFactory.getLogger(CustomerServcieImpl.class);
    @Resource
    private CustomerDao customerDao;
    @Override
    protected BaseDao<Customer> getMapper() {
        return this.customerDao;
    }

	@Override
	public List<Customer> findAllSelected(List<String> list) {
		// TODO Auto-generated method stub
		return customerDao.findAllSelected(list);
	}

	@Override
    public TableDataInfo findBySelected(Customer customer) {

        List<Customer> list = null;
        try {
            Page<?> page = startPage();
            list = customerDao.findBySelected(customer);

        } catch (Exception e) {
            logger.error("查询走访企业信息失败!原因是:",e);
        }
        TableDataInfo dataTable = getDataTable(list);
        return dataTable;
    }
}
